package com.allwees.bs.module.ics.rest;

import com.allwees.bs.core.modelbase.vo.R;
import com.allwees.bs.module.core.rest.BoCrudApi;
import com.allwees.bs.module.ics.entity.IcsPersonalChannel;
import com.allwees.bs.module.ics.req.IcsPersonalChannelReq;
import com.allwees.bs.module.ics.service.IcsPersonalChannelService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yangylsky
 * @since 2020-05-15
 */
@RestController
@RequestMapping("/backstage/api/personal_channel")
public class IcsPersonalChannelApi extends BoCrudApi<IcsPersonalChannel, IcsPersonalChannelService> {

    @PostMapping("save")
    public R create(@RequestBody IcsPersonalChannelReq req) {
        boService.create(req);
        return R.ok();
    }

    @PutMapping("update")
    public R update(@RequestBody IcsPersonalChannelReq req) {
        boService.updateByUuid(req);
        return R.ok();
    }
}
